<template>
  <div class="phone-login">
    <el-form :model="userMessage" :rules="rules" size="large">
      <el-form-item label="手机号" prop="phone">
        <el-input v-model="userMessage.phone"></el-input>
      </el-form-item>
      <el-form-item label="验证码" prop="verCode">
        <div class="verCode">
          <el-input v-model="userMessage.verCode"></el-input>
          <el-button type="info">获取验证码</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from "vue";
import { rules } from "../config/phone-login";

export default defineComponent({
  setup() {
    const userMessage = reactive({
      phone: "",
      verCode: ""
    });
    return { userMessage, rules };
  }
});
</script>

<style scoped lang="less">
.phone-login {
  padding: 20px 30px 0 30px;
  .verCode {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}
.el-button {
  margin-left: 10px;
}
</style>
